<style scoped lang="scss">
</style>
<template>
    <uni-number-box
        class="step uni-number-box-round"
        :min="min"
        :max="max"
        :value="valueData"
        @change="numberChange"
    ></uni-number-box>
</template>
<script>
export default {
    name: 'XyNumberBox',
    props: {
        value: {
            type: [Number,String],
            default: 0
        },
        min: {
            type: [Number,String],
            default: 0
        },
        max: {
            type: [Number,String],
            default: 0
        },
        setp: {
            type: [Number,String],
            default: 0
        }
    },
    data() {
        return {
            valueData: 0,
        }
    },
    created: function () {
        this.valueData = this.value;
    },
    methods: {
        numberChange(value) {
            this.valueData = value;
            this.$emit('input', this.valueData);
            this.$emit('change', this.valueData);
        }
    }
}
</script>
